//
//  PlayerViewController.h
//  BeanSproutEDU
//
//  Created by douya on 15/1/23.
//  Copyright (c) 2015年 douya. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "PlayerView.h"
#import "IndicatorView.h"
@interface PlayerViewController : UIViewController<PlayerViewDelegate,IndicatorViewDelegate>
{
    NSString *_totalTime;
    BOOL isPlaying,_frameChange,_isEnterBackground,_shouldPinch;
    CGFloat _totalSecond,_sliderValue;
    int count;
}

@property(nonatomic,strong)NSString *videoURL;
@property (weak, nonatomic) IBOutlet UIView *upBackView;
@property (weak, nonatomic) IBOutlet UIView *downBackView;
@property (weak, nonatomic) IBOutlet UIButton *fullScreenBtn;
@property(nonatomic,strong)AVPlayer *player;//播放器控制对象
@property(nonatomic,strong)AVPlayerItem *playerItem;//播放器的文件管理对象
@property(nonatomic,weak)IBOutlet PlayerView *playerView;//播放器的播放图层
@property (weak, nonatomic) IBOutlet UIButton *stateButton;//播放or暂停按钮
@property (weak, nonatomic) IBOutlet UISlider *videoSlider;//播放进度条
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;//时间显示
@property (weak, nonatomic) IBOutlet UIProgressView *videoProgress;//缓冲进度
@property(nonatomic,strong) IndicatorView *indicatorView;
//播放or暂停
- (IBAction)playBtn:(UIButton *)sender;


//快进
- (IBAction)speedDownBtn:(UIButton *)sender;
//后退
- (IBAction)retreatDownBtn:(UIButton *)sender;
- (IBAction)fullScreenBtn:(UIButton *)sender;
- (IBAction)backMainViewController:(UIButton *)sender;


@end
